package cn.witsky.rtp2ws.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import cn.witsky.rtp2ws.cache.Result;
import cn.witsky.rtp2ws.domain.CallInfo;

public class PushUtil {
	private static Logger logger = LoggerFactory.getLogger(PushUtil.class);
	public static void Start(CallInfo call) {
//		logger.info("通知ASA,开始接收Call:{}  caller-udp-port:{} called-udp-poort:{}",call.getCallId(),call.getUdpPort(),call.getUdpPort()+1);
	}
	
	public static void stop(CallInfo call) {
//		logger.info("通知ASA,停止接收Call:{}  caller-udp-port:{} called-udp-poort:{}",call.getCallId(),call.getUdpPort(),call.getUdpPort()+1);
//		Monitor caller=Monitor.getMonitorMap().get(call.getCallId()+"-caller");
//		Monitor called=Monitor.getMonitorMap().get(call.getCallId()+"-called");
//		logger.info("caller:{}",caller);
//		logger.info("caller:{}",called);
		logger.debug("=================输出结果=====================");
		Result.getResult(call);
		logger.debug("===================分割线===================");
	
	}
	
	public static void onTimeOut(CallInfo call) {
		logger.info("通知ASA,超时未释放Call:{}  caller-udp-port:{} called-udp-poort:{}",call.getCallId(),call.getUdpPort(),call.getUdpPort()+1);
	}
	
	public static void monitor(CallInfo call) {
//		logger.info("caller:{}",call.getMonitor(true));
//		logger.info("caller:{}",call.getMonitor(false));
	}
}
